from django import template

register = template.Library()


@register.inclusion_tag('dorpdownlist.html')
def sqr_list(num):
    sqr = [(i, "{}的平方是{}".format(i, i ** 2)) for i in range(1, num + 1)]

    return {'sqr': sqr}
